package com.anxuan.demo.Aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;

@Aspect
public class Aop2 {

    @Pointcut(value = "execution(* com.anxuan.demo.model.Student.*(..))")
    public void point(){

    }
    @Before(value = "point()")
    public void before(){
        System.out.println("##before");
    }

    @AfterReturning(value = "point()")
    public void after(){
        System.out.println("##after");
    }

    @Around("point()")
    public void around(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("$$before");
        joinPoint.proceed();
        System.out.println("$$after");

    }


}
